package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.SurveyForm;
import com.caigou.bean.cms.entity.SurveyFormStatistics;
import com.caigou.bean.cms.param.QueryFormParam;
import com.caigou.pojo.SurveyCatalogStatistics;
import com.caigou.pojo.SurveyFormData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SurveyFormMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SurveyForm record);

    int insertSelective(SurveyForm record);

    SurveyForm selectByPrimaryKey(Integer id);

    int updateByFormIdSelective(SurveyForm record);

    int updateByPrimaryKey(SurveyForm record);

    SurveyForm getSurveyFormByFormId(String formId);

    SurveyForm getSurveyFormHeaderByFormId(String formId);

    List<SurveyForm> queryForm(QueryFormParam param);

    List<SurveyForm> queryForm4Catalog(QueryFormParam param);

    int updateIsEnableByFormId(SurveyForm surveyForm);

    int updateIsDeleteByFormId(SurveyForm surveyForm);

    int deleteByFormId(@Param("formId")String formId);

    List<SurveyForm> listFormByIsDelete(@Param("isDelete")Integer isDelete);

    SurveyFormData loadSurveyFormData(@Param("formId") String formId);

    int updateFormSubmitCount(@Param("formId") String formId);

    SurveyCatalogStatistics loadSurveyCatalogStatistics(@Param("formId") String formId);

    List<com.caigou.pojo.SurveyFormStatistics> loadSurveyFormStatistics(@Param("formId") String formId);

    String loadSurveyFormIsEnable(@Param("formId") String formId);
}
